<template>
  <div>
    <h3>子</h3>
    <h5>{{ value }}</h5>
    <button @click="hclick">点击</button>
  </div>
</template>

<script>
export default {
  props: {
    value: {
      type: Number,
      required: true
      // default: 0
    }
  },
  methods: {
    hclick() {
      // this.value++
      this.$emit('input', this.value + 1)
    }
  }
}
</script>

<style>

</style>
